<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK"%>
<html>
<head>
<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
<title>类别管理</title>
<link href="${ctx}/css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/script/product/catalog.js"></script>
<script type="text/javascript" src="${ctx}/script/common/common.js"></script>
<script type="text/javascript" src="${ctx}/dwr/interface/searchDetailHelper.js"></script>
<script type="text/javascript" src="${ctx}/dwr/engine.js"></script>
<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
	body{
		background:#FFFFFF;
	}
-->
</style>
</head>
<body>
<table align="center" width="99%" style="border:0;background:#FFFFFF">
	<tr>
		<td valign="top" style="border:0;background:#FFFFFF">
		<form method="post" action="${ctx}/catalog/catalogMessage.do"
			target="catalogTree" onsubmit="return checkModifyCatalog();"><logic:present name="catalog">
			<bean:define id="catalogCode" name="catalog" property="catalogCode"/>
			<bean:define id="catalogId" name="catalog" property="id" />
			<bean:define id="helper" value="searchDetailHelper"/>
			<bean:define id="namesacpe" value="searchDetail_sqlMap"/>
			<input type="hidden" name="method" value="UpdateCatalog" />
			<input type="hidden" name="catalog.id" value="${catalogId}" />
		</logic:present>
		<table width="100%">
			<tr>
				<th colspan="4" height="25px">修改分类</th>
			</tr>
			<tr>
				<td class="td_01">名称：</td>
				<td class="td_04"><input type="text" name="catalog.name"
					value="${catalog.name }" maxlength="50" /> <span style="color:red;">﹡</span></td>
                    <td class="td_01">状态：</td>
				<td class="td_04"><select name="catalog.status">
					<option value="1">正常状态</option>
					<option value="0"
						<logic:notEqual name="catalog" property="status" value="1">selected</logic:notEqual>>暂停状态</option>
				</select></td>
			</tr>
			<tr>
				<td class="td_01">导航栏显示：</td>
				<td class="td_04"><select name="catalog.headshow">
					<option value="1">正常状态</option>
					<option value="0"
						<logic:notEqual name="catalog" property="headshow" value="1">selected</logic:notEqual>>暂停状态</option>
				</select></td>
                <td class="td_01">列表显示：</td>
				<td class="td_04"><select name="catalog.listshow">
					<option value="1">正常状态</option>
					<option value="0"
						<logic:notEqual name="catalog" property="listshow" value="1">selected</logic:notEqual>>暂停状态</option>
				</select></td>
			</tr>
			<tr>
				<td class="td_01">分期显示：</td>
				<td class="td_04"><select name="catalog.instshow">
					<option value="1">正常状态</option>
					<option value="0"
						<logic:notEqual name="catalog" property="instshow" value="1">selected</logic:notEqual>>暂停状态</option>
				</select></td>
                <td class="td_01">顺序：</td>
				<td class="td_04"><input type="text" name="catalog.sequence"
					value="${catalog.sequence}" /><span style="color:red;">﹡</span></td>
			</tr>
			<tr>
				<td class="td_01">htm显示内容,<br />如不需要请留空</td>
				<td class="td_04" colspan="3">
				<FCK:editor id="catalog.htm" basePath="${ctx}/FCKeditor/" width="90%" height="190px"
					defaultLanguage="zh-cn" toolbarSet="catalog" tabSpaces="8"
					imageBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/pages/safeai/jsp/connector"
					linkBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/pages/safeai/jsp/connector"
					flashBrowserURL="${ctx}/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/pages/safeai/jsp/connector"
					imageUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
					linkUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
					flashUploadURL="${ctx}/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
              ${catalog.htm}
  		</FCK:editor></td>
		</tr>
		<tr>
        	<td colspan="4" align="center">
            	<input type="submit" class="btn" value="确定" style="border: 1 solid #000000" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" class="btn" value="返回" onClick="javascript:history.go(-1);" ;  style="border: 1 solid #000000" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input id="showButton" class="btn" type="button" value="添加可搜索内容" onmousedown="showSearchContent();" tyle="border: 1 solid #000000" />
            </td>
        </tr>	
		</table>
		</form>
		</td>
	</tr>
    <tr>
    	<td valign="top" style="border:0;background:#FFFFFF">
			<div id="searchMain" style="display:none;word-break:break-all;">
				<table id="searchList"  width="100%">
					<tr>
						<th class="td_01" width="16%" height="25px">名称</th>
						<th class="td_01" width="16%">单位</th>
						<th class="td_01" width="16%">可选值</th>
						<th class="td_01" width="16%">状态</th>
						<th class="td_01" width="20%">关键字</th>
						<th class="td_01" width="16%">操 作</th>
					</tr>
					<logic:present name="catalog" property="searchDetails">
						<logic:iterate id="searchDetail" name="catalog" property="searchDetails">
							<tr bgcolor="#FFFFFF" identity="${searchDetail.id}" helper="${helper}" namespace="${namesacpe}">
								<td style="display: none;" class="td_04"><input type="hidden" name="catalogId" value="${catalogCode}" /></td>
								<td  width="16%" class="td_03"><input type="text" size="5" name="name" maxlength="20" value="${searchDetail.name}"></td>
								<td  width="16%" class="td_03"><input type="text" size="5" name="unit" maxlength="20" value="${searchDetail.unit}"></td>
								<td  width="16%" class="td_03"><textarea name="value" rows="2" cols="10">${searchDetail.value}</textarea></td>
								<td  width="16%" class="td_03">						
								<select name="deprecate">
									<option value="1">可用</option>
									<option value="0" <logic:equal  name="searchDetail" property="deprecate" value="0">selected="selected"</logic:equal>>不可用</option>
												
								</select>
								</td>
								<td width="20%" readonly="1" class="td_03"><span id="fix_keywords">${searchDetail.keywords}</span></td>
								<td id="operator" class="td_03" width="16%"><a href="javascript:void(0);" onclick="javascript:update(this);">修改</a>
								<br /><br /><a href="javascript:void(0);" onclick="javascript:remove(this);">删除</a></td>
							</tr>
						</logic:iterate>
					</logic:present>
				</table>
				<br>
				<table  width="100%" align="center">
					<tr id="searchInput" >
						<td style="display: none;" class="td_01"><input type="hidden" name="catalogId" value="${catalogCode}" /></td>
						<td class="td_01" width="16%"><input type="text" size="5" name="name" maxlength="20"></td>
						<td class="td_01" width="16%"><input type="text" size="5" name="unit" maxlength="20"></td>
						<td class="td_01" width="16%"><textarea name="value" rows="2" cols="10"></textarea></td>
						<td class="td_01" width="16%">
						<select name="deprecate">
							<option value="1">可用</option>
							<option value="0">不可用</option>
						</select>
						</td>
						<td immutable="1" width="20%" class="td_01">
						<select name="keywords">
							<logic:present name="keywords">
								<logic:iterate id="keyword" name="keywords">
									<option value="${keyword}">${keyword}</option>
								</logic:iterate>
							</logic:present>
						</select>
						</td>
						<td id="operator" width="16%" class="td_01"><input type="button" class="btn" value="添加" onclick="javascript:addRecord('searchInput', 'searchList','${namesacpe}','${helper}');"/>
                        </td>
					</tr>
				</table>
            </div>
		</td>
    </tr>
</table>
</body>
</html>